public abstract class AbstractService {

    protected AbstractMediator mediator;

    public AbstractService(AbstractMediator mediator) {
        this.mediator = mediator;
    }

    public abstract void doSomething();
}